package com.carleasoft.mps.core.utils.file;

import com.aspose.slides.Presentation;
import com.aspose.words.SaveFormat;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

/**
 * @author taoyujing
 * @date 2022-02-11 11:57
 * @project services
 */
public class PPT2PdfUtil {
    public static byte[] pptBytes2PdfBytes(byte[] excelBytes) throws Exception {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        Presentation ppt = new Presentation(new ByteArrayInputStream(excelBytes));
        ppt.save(outputStream,SaveFormat.PDF);
        return outputStream.toByteArray();
    }
}
